<style scoped src="./index.scss" lang="scss" rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>

    export default {
        mixins: [Vue.prototype.$vFN.Mixins.Base, Vue.prototype.$vFN.Mixins.Edit],
        components: {
            SelectGoods: async () => Vue.extend(await Vue.prototype.$vFN.Components.Base.SelectGoods())

        },
        data() {
            return {
                
appWindow: window,
                // 页面接口地址
                apiUrl: {
                    create: "mall-site-portal/plugin-coupon/create",
                    update: "mall-site-portal/plugin-coupon/update",
                    detail: "mall-site-portal/plugin-coupon/getItem",
                },
                selectGoodsValue:{
                    type: this.type,
                    data: [],
                    options: ["goods","classify","group","all"],
                },
                tableData: [],
                
            };
        },
        created () {
            // this.echos();
        },
        methods: {

            // 初始化
            async init() {

                // 显示窗口
                this.mixinEdit_editVisible = true;
                // 初始化数据
                // this.mixinEdit_editBoxInit({
                //     model: "form",
                //     id: this.id,
                // })
                
            },
        
            
            SelectGoods() {
                this.$vFN.Directives.SelectGoods({
                    data: this.selectGoodsValue.data,
                    type: this.selectGoodsValue.type,
                    options: this.selectGoodsValue.options,
                    onSuccess: (res) => {
                        
                    },
                });
            
            },

            // 提交成功
            onSubmitSuccess() {
                this.onSuccess();
            },
            // 成功回调
            onSuccess() {},
            // 取消回调
            onCancel() {},
            // 失败回调
            onError() {},

        },
        mounted() {
            this.init();
        },
        activated() {},
    };
</script>